﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Collections;

namespace GPCSC.Web.sjs
{
    public partial class mqsh : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                F_bound();
            }
        }
        protected void F_bound()
        {
            DataSet ds = new DataSet();
            Hashtable htable = new Hashtable();
            ds = new SqlReadXml().ReaderDataSet("mqsh", htable);
            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    if (dr["issh"].ToString() == "1")
                    {
                        dr["issh"] = "已通过";
                    }
                    else if (dr["issh"].ToString() == "0")
                    {
                        dr["issh"] = "<input type='radio' onclick='sh(this)' value='" + dr["tabid"].ToString() + "' />通过";
                    }
                    if (dr["iscz"].ToString() == "1")
                    {
                        dr["iscz"] = "已操作";
                    }
                    else
                    {
                        dr["iscz"] = "未操作";
                    }
                }
            }
            PostListS.DataSource = ds;
            PostListS.DataBind();
            this.pageinfo.InnerHtml = new FYpage().GetPageNum(ds.Tables[0], PostListS, 10);
        }
        protected void LCallBack_Callback(object sender, NickLee.Web.UI.CallBackEventArgs e)
        {
            string type = e.Parameters[0].ToString();
            try
            {
                if (type == "sh")
                {
                    string ids = e.Parameters[1].ToString();
                    Hashtable htable = new Hashtable();
                    htable.Add("issh", "1");
                    SQLServerDAL.databyhtable Dat = new SQLServerDAL.databyhtable();
                    Dat.databyhtables(htable, "update", "FK_MQ", "tabid", ids);
                    F_bound();
                }
            }
            catch (Exception ee)
            {

            }
            finally
            {
                LPanel.RenderControl(e.Output);
            }
                
        }
    }
}